<?php
/**
 * Magento Enterprise Edition
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Magento Enterprise Edition End User License Agreement
 * that is bundled with this package in the file LICENSE_EE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.magento.com/license/enterprise-edition
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    design
 * @package     enterprise_default
 * @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
 * @license http://www.magento.com/license/enterprise-edition
 */
?>
<?php $entityValues = $this->getEntityValues() ?>

<?php if ($this->getEnabled() && count($entityValues)): ?>
<form action="<?php echo $this->getAddUrl(); ?>" method="post" id="form-validate">
    <div class="btn-gift-registry">
        <div class="input-box">
            <select id="giftregistry_entity" name="entity" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Gift Registry')) ?>" class="required-entry">
                <?php foreach ($entityValues as $_entity): ?>
                    <option value="<?php echo $_entity->getValue() ?>" title="<?php echo Mage::helper('core')->quoteEscape($_entity->getTitle()) ?>"><?php echo $this->escapeHtml($this->helper('core/string')->truncate($_entity->getTitle(), 40)) ?></option>
                <?php endforeach; ?>
            </select>
        </div>
        <button type="submit" class="button"><span><span><?php echo Mage::helper('enterprise_giftregistry')->__('Add All To Gift Registry '); ?></span></span></button>
    </div>
</form>
<script type="text/javascript">
//<![CDATA[
var dataForm = new VarienForm('form-validate');
//]]>
</script>
<?php endif; ?>
